/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.packet.hj212.domain.factor.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.common.core.util.StringUtils;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 因子信息
 *
 * @author daijie
 * @date 2023-05-19 10:01:38
 */
@Data
@TableName("poll_factor_info")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "因子信息")
public class PollFactorInfoEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "id")
    private Long id;

    /**
     * 因子类型
     */
    @Schema(description = "因子类型")
    private String factorType;

    /**
     * 因子名称
     */
    @Schema(description = "因子名称")
    private String name;

    /**
     * 缩略名
     */
    @Schema(description = "缩略名")
    private String shortName;

    /**
     * 是否使用
     */
    @Schema(description = "是否使用")
    private Boolean useFlag;

    /**
     * 因子编码
     */
    @Schema(description = "因子编码")
    private String code;

    /**
     * 扩展编码
     */
    @Schema(description = "扩展编码")
    private String extCode;

    /**
     * 排序号
     */
    @Schema(description = "排序号")
    private Integer sortNum;

    /**
     * 计量单位
     */
    @Schema(description = "计量单位")
    private String unit;

    /**
     * 统计单位
     */
    @Schema(description = "统计单位")
    private String statisticUnit;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remarks;

    /**
     * orgId
     */
    @Schema(description = "orgId")
    private Long orgId;

    public String getUseFlagStr() {
        return StringUtils.getUseFlagStr(this.useFlag);
    }
}
